import {expect, test} from 'bun:test';
import {exampleVideoSamplePositions} from '../create/iso-base-media/example-stts';
import {createStss} from '../create/iso-base-media/trak/mdia/minf/stbl/create-stss';

const reference = new Uint8Array([
	0x00, 0x00, 0x00, 0x28, 0x73, 0x74, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00,
	0x00, 0x29, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00,
	0x65,
]);

test('stss', () => {
	expect(createStss(exampleVideoSamplePositions)).toEqual(reference);
});
